using GraphMyCode.Client.AssemblyService;
using GraphMyCode.Client.Scalling;

namespace GraphMyCode.Client.ViewModels
{
	public class EdgeViewModel : ElementViewModel
	{
		private readonly EdgeDto edgeModel;

		public EdgeViewModel(EdgeDto edgeModel, ScaleEngine scaleEngine)
		{
			this.edgeModel = edgeModel;

			Thick = edgeModel.Thick;
			ActualThick = scaleEngine.GetActualThick(Thick);
			IsDirectional = edgeModel.IsDirectional;
		}

		public EdgeDto EdgeModel
		{
			get { return edgeModel; }
		}

		public int Thick { get; private set; }
		public double ActualThick { get; private set; }
		public bool IsDirectional { get; private set; }

		public NodeViewModel FromNode { get; set; }
		public NodeViewModel ToNode { get; set; }
	}
}